package cn.edu.gxnu.dsa.gms;

import cn.edu.gxnu.dsa.sort.DoubleType;

public class StudentGradeRecord {

	private String studentNr;
	private String name;
	private DoubleType chineseGrade;
	private DoubleType mathGrade;
	private DoubleType englishGrade;
	private DoubleType sum;
	private DoubleType averageGrade;	
	
	public StudentGradeRecord(String studentNr, String name, DoubleType chineseGrade, DoubleType mathGrade,
			DoubleType englishGrade) {
		super();
		this.studentNr = studentNr;
		this.name = name;
		this.chineseGrade = chineseGrade;
		this.mathGrade = mathGrade;
		this.englishGrade = englishGrade;
		this.setSum(new DoubleType(chineseGrade.getKey()+mathGrade.getKey()+englishGrade.getKey()));
		this.setAverageGrade(new DoubleType((chineseGrade.getKey()+mathGrade.getKey()+englishGrade.getKey())/3.0));		
	}
	
	public String getStudentNr() {
		return studentNr;
	}
	public void setStudentNr(String studentNr) {
		this.studentNr = studentNr;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public DoubleType getChineseGrade() {
		return chineseGrade;
	}
	public void setChineseGrade(DoubleType chineseGrade) {
		this.chineseGrade = chineseGrade;
	}
	public DoubleType getMathGrade() {
		return mathGrade;
	}
	public void setMathGrade(DoubleType mathGrade) {
		this.mathGrade = mathGrade;
	}
	public DoubleType getEnglishGrade() {
		return englishGrade;
	}
	public void setEnglishGrade(DoubleType englishGrade) {
		this.englishGrade = englishGrade;
	}
	public DoubleType getSum() {
		return sum;
	}
	public DoubleType getAverageGrade() {
		return averageGrade;
	}

	public void setSum(DoubleType sum) {
		this.sum = sum;
	}

	public void setAverageGrade(DoubleType averageGrade) {
		this.averageGrade = averageGrade;
	}	
	
}
